<template>
      <div class="editable-cell">
        <div  class="editable-cell-input-wrapper">
          <BaseInput  :value="value"  @change="handleChange"   @blur="blurData" />
        </div>
      </div>
</template>
<script>
  import { getWbsTemplate, addSameNode, addNextNode, editNode, deleteNode ,editTemplateNode} from '@/api/template'
export default {
  props: {
    text: [String,Number,Object],
    record:[Object],
    type:[String]
  },
  data() {
    return {
      value: this.text,
      editable: false,
    };
  },
  methods: {
    handleChange(e) {
      const value = e.target.value;
      this.value = value;
      console.log(this.type)
    },
    check() {
      this.editable = false;
      this.$emit('change', this.value);
    },
    blur(value){
      console.log(value)
      console.log("value")

    },
    blurData(value){
      console.log(value.target.value)
      editTemplateNode()
      console.log("value")
      // this.$emit('blurData',);
    },
    edit() {
      this.editable = true;
    },
    },
};
</script>
<style scoped>
.editable-cell {
    position: relative;
}
.editable-cell-text-wrapper {
    padding: 4px 5px 5px 5px;
    cursor: pointer;
}
</style>
